/**
 *
 */
package edu.cmu.ece.ds.droidchat.message;

import java.io.Serializable;

/**
 * This is message that the client sends to the server periodically after it
 * logs in and obtains a loging_session_id.
 *
 * This message tells the server its current location to the server
 *
 * The client then listens to NeighborInfoMessage sent with the round number
 *
 */
public class ClientUpdateLocationMessage extends DroidChatMessage implements
		Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = -534482042796341092L;

	public ClientUpdateLocationMessage(double lat, double longi, int ses_id) {
		super(DroidChatMessage.UPDATE_LOCATION);
		latitude = lat;
		longitude = longi;
		login_session_id = ses_id;
	}

	private double latitude;
	private double longitude;
	private int login_session_id = 0;
	private int round_number = 0;

	public double getLatitude() {
		return latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public int getLogin_session_id() {
		return login_session_id;
	}

	public int getRound_number() {
		return round_number;
	}

	public void setRound_number(int round_number) {
		this.round_number = round_number;
	}

	public String toString() {
		return "ClientUpdateLocationMessage. login_session_id="
				+ this.login_session_id + " longitude=" + this.longitude
				+ " latitude=" + this.latitude + " round=" + this.round_number;
	}
}
